package com.atguigu.homework.exer.e1;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/13 16:45
 * @注释
 */
public class Employee implements Comparable<Employee>{
    private int num;
    private String name;
    private double salary;
    private int age;

    @Override
    public int compareTo(Employee o) {
        return num - o.num;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "id=" + num +
                ", name='" + name + '\'' +
                ", salary=" + salary +
                ", age=" + age +
                '}';
    }

    public Employee(int num, String name, double salary, int age) {
        this.num = num;
        this.name = name;
        this.salary = salary;
        this.age = age;
    }

    public Employee() {
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }


}
